<?php

namespace App\Http\Controllers\Applet\Other;

use App\Services\Applet\Other\AliYunCloudService;
use Exception;
use Illuminate\Http\JsonResponse;

class AliYunCloudController extends BaseOtherController
{
    protected AliYunCloudService $aliYunCloudService;

    /**
     * @throws Exception
     */
    public function __construct(){
        parent::__construct();
        $this->aliYunCloudService = $this->loadService('Applet\Other\AliYunCloudService');
    }

    /**
     * 获取临时凭证
     *
     * @return JsonResponse
     * @throws Exception
     */
    public function getTemporaryVouchers(): JsonResponse
    {
        $data = $this->aliYunCloudService->getTemporaryVouchers($this->params);
        return outputJsonResult($data);
    }

}
